/**
 * Copyright (c) 2010, QinJian
 * All rights reserved.
 */
package com.q.course.dao.classes;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import com.q.course.entity.classes.Classes;

/**
 * @author 覃健,Email:j411@qq.com
 *
 */
public interface ClassesDao extends PagingAndSortingRepository<Classes, Long> {

	@Query("from Classes c where c.existState=?1 group by c.place.id")
	List<Classes> findPlaceByClass( boolean b );
	
	List<Classes> findByExistStateAndPlaceId( Boolean b, Long pid );
	
	List<Classes> findByExistState( Boolean b );
}
